**************************************************************************************************
*** This do file creates the replication results for 
*** Corruption and Climate Change Policies: Do the Bad Old Days Matter?						 	*/
*** Per G. Fredriksson (University of Louisville)												*/
*** Eric Neumayer (LSE)																			*/
*** 																							*/
*** Published in: Environmental and Resource Economics, 63 (2), 2016, pp. 451-469									*/
**************************************************************************************************
**************************************************************************************************
/* Note: 
You have to change "local DIR" to the directory you copy the original stata files contained 	*/
/* in the zip file and then run the do file. 													*/
**************************************************************************************************

drop _all
clear matrix
clear mata

capture net install outreg2, from(http://fmwww.bc.edu/RePEc/bocode/o)			/* checks whether outreg2 is installed 		*/

***********************************************************************************
local DIR = "d:\Research\Environment\Political Economy of the Environment\"  /*change relative path to the directory where the files are located */
cd "`DIR'"
***********************************************************************************

use "Article for ERE (climate policy).dta", replace

***** Corruption stock estimates (ICRG with current corruption, WB without current corruption due to high correlation)

** Table 1
quietly reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
su climi if e(sample)

quietly reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
su glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth demcap_ab0_sc_1800onw dem_ab0 cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian  wb_corrcap_cont_scaled wb_corr  if e(sample)

quietly reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
su icrg_corrcap_cont_sc icrg_corr if e(sample)


** Table 2
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  replace
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append


** Table 3
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc icrg_corr  demcap_ab0_sc_1800onw  if icrg_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  replace
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc icrg_corr  demcap_ab0_sc_1800onw dem_ab0 if icrg_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled wb_corr  demcap_ab0_sc_1800onw  if wb_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled wb_corr  demcap_ab0_sc_1800onw dem_ab0 if wb_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc  icrg_corr demcap_ab0_sc_1800onw  if icrg_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_sc  icrg_corr demcap_ab0_sc_1800onw dem_ab0 if icrg_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled  wb_corr demcap_ab0_sc_1800onw  if wb_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled  wb_corr demcap_ab0_sc_1800onw dem_ab0 if wb_corr!=., robust
estat vif
outreg2 using table3, excel adjr2  append


  
** Table 4
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian  icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table4, excel adjr2  replace
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian  icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table4, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp gdppcgrowth cdi trade_gdp  stabs  s_island  leg_french leg_socialist leg_german leg_scandivanian wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table4, excel adjr2  append



***  Table 5: Regional jackknives on ICRG measure
reg  climi   if polity2!=. , robust 
outreg2 using table5, excel adjr2   replace
foreach region in  reg_eap reg_eca reg_sa reg_mena reg_ssa reg_we reg_na reg_lac {
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_scaled   demcap_ab0_sc_1800onw if icrg_corr!=. & `region'==0, robust 
outreg2 using table5, excel adjr2   append
}

***  Table 5: Regional jackknives on WB measure
reg  climi   if polity2!=. , robust 
outreg2 using table6, excel adjr2   replace
foreach region in  reg_eap reg_eca reg_sa reg_mena reg_ssa reg_we reg_na reg_lac {
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=. & `region'==0, robust 
outreg2 using table6, excel adjr2   append
}

***  Table 5: Regional jackknives on ICRG measure
reg  glo_col   if polity2!=. , robust 
outreg2 using table7, excel adjr2   replace
foreach region in  reg_eap reg_eca reg_sa reg_mena reg_ssa reg_we reg_na reg_lac {
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_scaled   demcap_ab0_sc_1800onw if icrg_corr!=. & `region'==0, robust 
outreg2 using table7, excel adjr2   append
}

***  Table 5: Regional jackknives on WB measure
reg  glo_col   if polity2!=. , robust 
outreg2 using table8, excel adjr2   replace
foreach region in  reg_eap reg_eca reg_sa reg_mena reg_ssa reg_we reg_na reg_lac {
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=. & `region'==0, robust 
outreg2 using table8, excel adjr2   append
}


***  Table 6: Other discount factors
reg  climi   if polity2!=. , robust 
outreg2 using table9, excel adjr2   replace
tempvar discount
foreach i in  1 3 9 12 {
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_`i'pc_disc_sc   demcap_ab0_sc_1800onw if icrg_corr!=. , robust 
outreg2 using table9, excel adjr2   append
}

***  Table 6: Other discount factors
reg  climi   if polity2!=. , robust 
outreg2 using table10, excel adjr2   replace
tempvar discount
foreach i in  1 3 9 12 {
reg  climi kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_`i'pc_disc_sc   demcap_ab0_sc_1800onw if wb_corr!=. , robust 
outreg2 using table10, excel adjr2   append
}

***  Table 6: Other discount factors
reg  glo_col   if polity2!=. , robust 
outreg2 using table11, excel adjr2   replace
tempvar discount
foreach i in  1 3 9 12 {
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp icrg_corrcap_cont_`i'pc_disc_sc   demcap_ab0_sc_1800onw if icrg_corr!=. , robust 
outreg2 using table11, excel adjr2   append
}

***  Table 6: Other discount factors
reg  glo_col   if polity2!=. , robust 
outreg2 using table12, excel adjr2   replace
tempvar discount
foreach i in  1 3 9 12 {
reg  glo_col kyoto_pledge2 non_annex1 co2pc gdp_pc_ppp wb_corrcap_cont_`i'pc_disc_sc   demcap_ab0_sc_1800onw if wb_corr!=. , robust 
outreg2 using table12, excel adjr2   append
}



*** Additional robustness tests stated in text, but not explicitly reported
** Drop Kyoto Protocol variables from model 
reg  climi  co2pc gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  replace
reg  climi  co2pc gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi  co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi  co2pc gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col  co2pc gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col  co2pc gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col  co2pc gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col  co2pc gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append

** Drop CO2 emissions from model
reg  climi kyoto_pledge2 non_annex1  gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  replace
reg  climi kyoto_pledge2 non_annex1  gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1  gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  climi kyoto_pledge2 non_annex1  gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1  gdp_pc_ppp icrg_corrcap_cont_sc demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1  gdp_pc_ppp icrg_corr  demcap_ab0_sc_1800onw if icrg_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1  gdp_pc_ppp wb_corrcap_cont_scaled   demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append
reg  glo_col kyoto_pledge2 non_annex1  gdp_pc_ppp wb_corr  demcap_ab0_sc_1800onw if wb_corr!=., robust
outreg2 using table2, excel adjr2  append

